﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="userExpireReport.aspx.vb" Inherits="Administrator_userExpireReport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <script type="text/javascript">
            $(document).ready(function () {

                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                    yearAddToDisplay: 543,
                    dateFormat: 'dd/mm/yy',
                    showOn: "button",
                    buttonImage: "../img/calendar.gif",
                    buttonImageOnly: true
                }));
                $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                    yearAddToDisplay: 543,
                    dateFormat: 'dd/mm/yy',
                    showOn: "button",
                    buttonImage: "../img/calendar.gif",
                    buttonImageOnly: true
                }));
                function EndRequestHandler(sender, args) {
                    $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                        yearAddToDisplay: 543,
                        dateFormat: 'dd/mm/yy',
                        showOn: "button",
                        buttonImage: "../img/calendar.gif",
                        buttonImageOnly: true
                    }));
                    $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                        yearAddToDisplay: 543,
                        dateFormat: 'dd/mm/yy',
                        showOn: "button",
                        buttonImage: "../img/calendar.gif",
                        buttonImageOnly: true
                    }));

                }

            });
    </script>
          <table style="width:100%;">
                <tr>
                    <td style="text-align: right"  >
                        ประเภทปลดล็อค :</td>
                    <td style="text-align: left" >
                        <asp:DropDownList ID="ddlType" runat="server" CssClass="control" Width="205px">
                            <asp:ListItem Value="0">**กรุณาเลือกประเภทปลดล็อค**</asp:ListItem>
                            <asp:ListItem Value="1">login เกิน</asp:ListItem>
                            <asp:ListItem Value="2">ผู้ใช้งานหมดอายุ</asp:ListItem>
                            <asp:ListItem Value="3">รหัสผ่านหมดอายุ</asp:ListItem>
                            <asp:ListItem Value="4">ปลดล็อคอินค้าง</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                     <td style="text-align: right">ปลดล็อค ช่วงวันที่ :</td>
                      <td align="left">
                          <asp:TextBox ID="txtStartDate" runat="server" Width="183px" Height="20px" 
                              AutoCompleteType="Disabled"></asp:TextBox>
                    </td>
                       <td style="text-align: right">ถึง</td>
                         <td align="left">
                             <asp:TextBox ID="txtEndDate" runat="server" Width="180px" Height="20px" 
                                 AutoCompleteType="Disabled"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; height: 26px;">
                        &nbsp; ฝ่าย :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:DropDownList ID="ddlDepartMent" runat="server" AutoPostBack="True" 
                            CssClass="control" Height="25px" Width="199px">
                        </asp:DropDownList>
                    </td>
                    <td style="text-align: right; height: 26px;">
                        &nbsp;ส่วนงาน/สาขา :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:DropDownList ID="ddlBranch" runat="server" CssClass="control" 
                            Height="25px" Width="199px">
                        </asp:DropDownList>
                    </td>
                    <td style="text-align: right; height: 26px;">
                        &nbsp; กลุ่มสิทธิ์ :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:DropDownList ID="ddlUserRight" runat="server" CssClass="control" 
                            Width="199px" Height="25px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; height: 26px;">
                        &nbsp; รหัสผู้ใช้งาน :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:TextBox ID="txtUserName" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" style="margin-bottom: 0px" Width="200px"></asp:TextBox>
                    </td>
                    <td style="text-align: right; height: 26px;">
                        ชื่อผู้ใช้งาน :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:TextBox ID="txtFirstName" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" Width="200px"></asp:TextBox>
                    </td>
                    <td style="text-align: right; height: 26px;">
                        นามสกุลผู้ใช้งาน :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:TextBox ID="txtLastName" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="text-align: right">
                        <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="search" 
                            Width="80px" />
                        <asp:Button ID="btnClear" runat="server" CssClass="control" Text="เคลียร์" 
                            Width="80px" />
                        <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="พิมพ์" 
                            Width="80px" />
                    </td>
                </tr>
           </table>
            <div align="center">
                   <asp:Label ID="lblMsg" runat="server" CssClass="control" Font-Size="XX-Large" 
                            ForeColor="Red" Height="30px" Visible="False"></asp:Label>
                        <asp:GridView ID="gvUserExpire" runat="server" AllowSorting="True" 
                            AutoGenerateColumns="False" CellPadding="4" CssClass="control" 
                            ForeColor="#333333" Width="100%" AllowPaging="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:BoundField DataField="USERNAME" HeaderText="รหัสผู้ใช้งาน" ReadOnly="True" 
                                    SortExpression="USERNAME">
                                <ItemStyle HorizontalAlign="Left" Width="150px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="EmpFullName" HeaderText="ชื่อ-นามสกุล" ReadOnly="True" 
                                    SortExpression="EmpFullName">
                                <ItemStyle Width="20%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="DEPTNAME" HeaderText="ฝ่าย" 
                                    SortExpression="DEPTNAME">
                                <ItemStyle Width="15%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="BRANCHNAME" HeaderText="ส่วนงาน/สาขา" 
                                    SortExpression="BRANCHNAME">
                                <ItemStyle Width="15%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="REASONTXT" HeaderText="สาเหตุการติดล็อค" 
                                    SortExpression="REASONTXT">
                                <ItemStyle HorizontalAlign="Left" Width="15%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="DATEUNLOCK" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" 
                                    HeaderText="วันที่ปลดล็อค" SortExpression="DATEUNLOCK">
                                <ItemStyle HorizontalAlign="Center" Width="150px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="UNLOCKER" HeaderText="รหัสผู้ปลดล็อค" 
                                    SortExpression="UNLOCKER">
                                <ItemStyle HorizontalAlign="Left" Width="15%" />
                                </asp:BoundField>
                            </Columns>
                            <FooterStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                            <RowStyle ForeColor="#333333" />
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView> 
             </div>
            <div align="right">
                   <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
             </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

